using System;
using System.Windows.Forms;

namespace PMngr.Main
{
    public static class ApplicationExit
    {
        public static void ExitApplication()
        {
            const int exitCode = 1;

            if (Application.MessageLoop)
            {
                Application.Exit();
            }
            else
            {
                Environment.Exit(exitCode);
            }
        }
    }
}